home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / oath.lha / oath / src / dlNodeP.cc < prev    next >
C/C++ Source or Header  |  1991-08-29  |  2KB  |  49 lines

  1. //***************************************************************************
  2. //             OATH :: Object-oriented Abstract Type Hierarchy
  3. //***************************************************************************
  4. //
  5. //  Copyright (C) 1991, 1990  Texas Instruments Incorporated
  6. //  Permission is granted to any individual or institution
  7. //  to use, copy, modify, and distribute this software,
  8. //  provided that this complete copyright and permission notice
  9. //  is maintained, intact, in all copies and supporting documentation.
  10. //
  11. //  Texas Instruments Incorporated provides this software "as is"
  12. //  without express or implied warranty.
  13. //
  14. //***************************************************************************
  15. //  dlNodeP
  16. //
  17. //  History:
  18. //    10/90  Brian M Kennedy  Major Rewrite
  19. //    02/90  Brian M Kennedy  Original
  20. //
  21. //***************************************************************************
  22.  
  23. #include "copyright.h"
  24.  
  25. #include <oath/dlNodeP.h>
  26.  
  27. /////////////////////////////////////////////////////////////////////////////
  28. // dlNodeP Outline Definitions
  29.  
  30. // Dynamic Allocation
  31.  
  32. #ifdef OATH_HANDLE_NEW
  33.  
  34. int      dlNodeP::AllocateCount = 10;
  35.  
  36. dlNodeP *dlNodeP::FreeList      = 0;
  37.  
  38.     void dlNodeP::
  39. allocate ()
  40.    {FreeList = (dlNodeP*) new char [sizeof(dlNodeP) * AllocateCount];
  41.     for(int I = 0; I < AllocateCount-1; I++)
  42.     FreeList[I].Next = &FreeList[I+1];
  43.     FreeList[AllocateCount-1].Next = 0;
  44.    }
  45.  
  46. #endif
  47.  
  48. //***************************************************************************
  49.